<template>
	<div>
		<div class="recommend-title">
			<img class="recommend-title-img" src="http://img1.qunarzz.com/piao/fusion/1711/89/ebc329f16c55bb02.png">
			猜你喜欢
		</div>
		<ul>
			<router-link tag="li" :to='/detail/ + item.id' class="item" v-for="(item,index) in list" :key="item.id">
				<img class="item-img" :src="item.imgUrl" >
				<div class="item-info">
					<p class="item-title">{{item.title}}</p>
					<p class="item-desc">{{item.desc}}</p>
					<button class="item-btn">查看详细</button>
				</div>
			</router-link>
		</ul>
	</div>
</template>

<script>
export default {
	name: 'HomeRecommend',
	props: {
		list: Array
	}
}
</script>

<style lang="stylus" scoped="">
@import '~styles/varibles'
@import '~styles/mixins'
.recommend-title
	height: .8rem
	line-height: .8rem
	text-indent: .2rem
	background: #eee
	font-size:.32rem
	.recommend-title-img
		width:.3rem
		height:.3rem
.item
	display: flex
	height: 2rem
	overflow: hidden
	border-bottom: solid 1px #eee
	.item-img
		padding: .2rem
		width: 1.6rem
		height: 1.6rem
	.item-info
		padding: .2rem
		padding-left: 0
		min-width: 0
		.item-title
			font-size: .32rem
			line-height:.5rem
			ellipsis()
		.item-desc
			color: #999
			line-height: .4rem
			ellipsis()
		.item-btn
			background:#ffb91c
			color:#fff
			padding:.06rem .15rem
			border-radius: .04rem
			margin-top: .1rem
</style>